package com.aispeech.jarpc;

public class ArpcException extends Exception {
    private int code;

    public ArpcException(int errcode, String message) {
        super(message);
        this.code = errcode;
    }

    public ArpcException(String message) {
        super(message);
        code = EArpcState.S_INTERNAL_ERROR.getValue();
    }

    public ArpcException(EArpcState state) {
        super(state.toString());
        code = state.getValue();
    }

    public int getCode() {
        return code;
    }
}
